//
// Created by Kerberos Zhang on 14-11-18.
//

#import <Foundation/Foundation.h>

@interface NSString (HTTPExtensions)
- (BOOL)isHTTPContentType:(NSString *)prefixStr;
+ (BOOL)isBlankString:(NSString *)string;
+ (BOOL)isNumber:(NSString *)string;
- (NSString *)URLEncodedStringWithCFStringEncoding:(CFStringEncoding)encoding;
- (NSString *)URLEncodedString;
- (NSString *)encodedURLString;
- (NSString *)encodedURLParameterString;
- (NSString *)prp_URLEncodedFormStringUsingEncoding:(NSStringEncoding)enc;
- (NSString *)prp_percentEscapedStringWithEncoding:(NSStringEncoding)enc
                              additionalCharacters:(NSString *)add
                                 ignoredCharacters:(NSString *)ignore;
- (NSString *)subStringByRemoveMutableParams;
+ (NSString *)replaceTmString:(NSString *)originURL TmValue:(NSString *)tmValue;
+ (NSString *)getNewURL:(NSString *)originalUrl tmValue:(NSString *)tmValue streamId:(NSString *)streamId;

/**
功能：
检测URL中是否已经有&format=1或者expect=3之类的，如果有，则进行替换
如果没有，则进行添加
参数说明：
originURL:要进行处理的URL
keyword:关键字，比如format、expect之类的
toValue:要替换的值，如@"1", @"3"之类的
*/
+ (NSString *)replaceString:(NSString *)originURL keyword:(NSString *)keyword toValue:(NSString *)toValue;
@end